home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Text⁄Files / Tape Stuff / SCSIDefines.h < prev    next >
Text File  |  1992-11-15  |  798b  |  42 lines

  1. /* SCSIDefines.h */
  2.  
  3. /* SCSI stuff */
  4.  
  5. #define SENSE_BYTES     4                    /* number of bytes in sense reply */
  6. #define BLOCKSIZE         512                    /* block size */
  7. #define TIMEOUT         18000                /* command timeout (ticks) */
  8.  
  9. #define UNIT_READY         0x00
  10. #define REWIND             0x01
  11. #define REQUEST_SENSE     0x03                
  12. #define READ             0x08
  13. #define WRITE             0x0a
  14. #define FILE_MARK        0x10
  15. #define SPACE            0x11
  16. #define INQUIRY         0x12
  17. #define ERASE            0x19
  18.  
  19. #define SPACE_BLOCKS     0
  20. #define SPACE_MARKS        1
  21.  
  22. typedef struct                            /* SCSI command structure */
  23. {
  24.     unsigned char opCode;
  25.     unsigned char byte1;
  26.     unsigned char byte2;
  27.     unsigned char byte3;
  28.     unsigned char byte4;
  29.     unsigned char controlByte;
  30. } SCSI_Command;
  31.  
  32. /* General stuff */
  33.  
  34. #ifndef OK
  35. #define OK 0
  36. #endif
  37. #ifndef ERROR
  38. #define ERROR 1
  39. #endif
  40. #ifndef NIL
  41. #define NIL 0L
  42. #endif